Repository navigation
Fix CI, lock throttle state, and keep checkpointID through splits - #9
Merged
Merged
Conversation
(cherry picked from commit e0ec2fd)
rateLimitController, throttleDuration, and nextOperationDeadline are written from CloudKit completion callbacks on arbitrary threads and read by queueOperation on the caller's thread. Guard all three with one lock and make them private so nothing reads them unguarded. This is the throttle half of 8371389 from async-surfaces. That commit also locked per-operation accumulators for modifyRecordsResultBlock and the pre-builder fetch code; main has since restored the deprecated modify completion block (0ba54f7) and moved fetch accumulation into FetchOperationResponseBuilder (4d00787), so those hunks are dropped and main's side is kept unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…letions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit b140693)
swift-actions/setup-swift@v1 installs a Swift 5.x toolchain that cannot build the tools 6.0 manifest; the macos-15 image's default Xcode toolchain ships Swift 6.x. This is the CI half of 9ee58d0 from async-surfaces. That commit's README section documented the async streams and perform APIs, which are not being carried over, so it is left out. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The build failed on macos-15 with "type 'CKError.Code' has no member 'participantAlreadyInvited'". That case was added in the macOS 26 SDK, and ErrorMiddleware has listed it since 4d00787, so the package no longer compiles with Xcode 16. macos-26 defaults to Xcode 26.6, which ships that SDK. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Four small, independent commits salvaged from the unmerged
async-surfacesbranch. None of that branch's async API (streams,perform,WorkWaiters) is included.Package.swiftmoves to tools 6.0, keeps both targets in Swift 5 language mode, and turns onStrictConcurrencywarnings for the library target.rateLimitController,throttleDuration, andnextOperationDeadlineinCloudKitOperationHandlerare written from CloudKit completion callbacks and read when queueing an operation. They are now guarded by one lock and made private.checkpointIDsurvives a size split.ModifyOperation.splitonly attached the checkpoint to the last delete chunk, so an oversized operation with no deletions lost it. The checkpoint now rides the final chunk regardless. Two tests added.swift-actions/setup-swift@v1and runs onmacos-26, so the build uses the runner's default Xcode. The first attempt pinnedmacos-15and failed:ErrorMiddlewarereferencesCKError.Code.participantAlreadyInvited, which only exists in the macOS 26 SDK and later.Why
mainhas failed at the Build step on every recorded run since April 2026.checkpointIDmeans a caller waiting on that checkpoint never sees it complete.Notes for review
modifyRecordsResultBlockand the old fetch code, whichmainhas since replaced (deprecated modify completion block restored, fetch accumulation moved intoFetchOperationResponseBuilder). All conflicts were resolved tomain's side, so modify and fetch error handling are unchanged. The CI commit leaves out its source's README section on the async API.mainalready needs the macOS 26 SDK (Xcode 26) to compile because of thatCKErrorcase, even though the manifest does not say so.Verification
🤖 Generated with Claude Code